﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using FluentNHibernate.Mapping;
using MedicalCare.EntityDefinitions.Entities;

namespace MedicalCare.EntityMappings.EntityMaps
{
    public class UserMap : ClassMap<UserEntity>
    {
        //Champion 2013/1/5
        public UserMap()
        {
            Table("Users");
            Id(x => x.Id).Column("Id").Not.Nullable();
            Map(x => x.Age).Column("Age");
            Map(x => x.Name).Column("Name");
            Map(x => x.RoleCode).Column("RoleCode").Not.Nullable();
            Map(x => x.AddressDetail).Column("AddressDetail");
            Map(x => x.Province).Column("Province");
            Map(x => x.District).Column("District");
            Map(x => x.City).Column("City");
            Map(x => x.Comment).Column("Comment");
            Map(x => x.Email).Column("Email");
            Map(x => x.Gender).Column("Gender");
            Map(x => x.IDNumber).Column("IDNumber");
            Map(x => x.Mobile).Column("Mobile");
            Map(x => x.Password).Column("Password");
            Map(x => x.PostalCode).Column("PostalCode");
            Map(x => x.QQ).Column("QQ");
            Map(x => x.Valid).Column("Valid");
        }
    }
}
